package com.heima.selection.core.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;

/**
 * 无权限异常
 *
 * @author YuanZiwen
 * @date 2023/12/07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class NoSuchPermissionException extends BaseException {

    /**
     *
     */
    @Serial
    private static final long serialVersionUID = 1L;

    private Integer code;

    private String message = "无权限操作";

    public NoSuchPermissionException(String message) {
        super();
        this.message = message;
    }

    public NoSuchPermissionException() {
        super();
    }

    public NoSuchPermissionException(Integer code, String message) {
        super();
        this.code = code;
        this.message = message;
    }


    @Override
    public String toString() {
        return "NoSuchPermissionException{" +
                "code='" + code + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
